import Vue from "vue"
import Router from "vue-router"

/* 直播详情页 */
const Live = r => require.ensure([], () => r(require('../pages/Live/live.vue')), 'Live');
/* 主播扬帆号分享页 */
const Anchor = r => require.ensure([], () => r(require('../pages/Index/anchor.vue')), 'Anchor');
/* 普通扬帆号分享页 */
const Index = r => require.ensure([], () => r(require('../pages/Index/index.vue')), 'Index');
/* 视频详情页 */
const Video = r => require.ensure([], () => r(require('../pages/Video/video.vue')), 'Video');
/* 小视频详情页 */
const MiniVideo = r => require.ensure([], () => r(require('../pages/Video/MiniVideo.vue')), 'MiniVideo');
/* 专题页 */
const Special = r => require.ensure([], () => r(require('../pages/Special/special.vue')), 'Special');
/* 专辑页 */
const Album = r => require.ensure([], () => r(require('../pages/Album/album.vue')), 'Album');
/* 秀场页 */
const Show = r => require.ensure([], () => r(require('../pages/Show/show.vue')), 'Show');
/* 文章页 */
const Article = r => require.ensure([], () => r(require('../pages/News/Article.vue')), 'Article');
/*图集页*/
const Atlas = r => require.ensure([], () => r(require('../pages/News/Atlas.vue')), 'Atlas');
/*音频页*/
const Audio = r => require.ensure([], () => r(require('../pages/Audio/Audio.vue')), 'Audio');
/* 404页面 */
const Dnf = r => require.ensure([], () => r(require("../pages/Dnf/dnf.vue")), "Dnf");

Vue.use(Router);

export default new Router({
    mode: "history",
    routes: [
        {
            path: "/yfs/channel/:channelid/homepage",
            name: "Index",
            component: Index,
        },
        {
            path: "/yfs/channel/:channelid/showhomepage",
            name: "Anchor",
            component: Anchor,
        },
        {
            path: "/yfs/live/:channelid/:programid",
            name: "Live",
            component: Live,
        },
        {
            path: "/yfs/video/:channelid/:videoid",
            name: "Video",
            component: Video,
        },
        {
            path: "/yfs/minivideo/:channelid/:videoid",
            name: "MiniVideo",
            component: MiniVideo,
        },
        {
            path: "/yfs/special/:specialid",
            name: "Special",
            component: Special,
        },
        {
            path: "/yfs/albumList/:albumid",
            name: "Album",
            component: Album,
        },
        {
            path: "/yfs/channelvertical/:channelid/:programid",
            name: "Show",
            component: Show,
        },
        {
            path: "/yfs/Article/:articleId",
            name: "Article",
            component: Article,
        },
        {
            path: "/yfs/Atlas/:atlasId",
            name: "Atlas",
            component: Atlas,

        },
        {
            path: "/yfs/Audio/:audioId",
            name: "Audio",
            component: Audio,

        },
        {
            path: "/yfs/dnf",
            name: "Dnf",
            component: Dnf,
        }
    ],
});
